home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / xcmd / cliptoic.cpt / clipToICON XCMD / background_2726.xml next >
Encoding:
Extensible Markup Language  |  1991-10-26  |  11.1 KB  |  326 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>2726</id>
  5.     <filler1>0</filler1>
  6.     <cantDelete> <false /> </cantDelete>
  7.     <showPict> <true /> </showPict>
  8.     <dontSearch> <false /> </dontSearch>
  9.     <link rel="stylesheet" type="text/css" href="stylesheet_3106.css" />
  10.     <part>
  11.         <id>3</id>
  12.         <type>button</type>
  13.         <visible> <true /> </visible>
  14.         <reserved5> 0 </reserved5>
  15.         <reserved4> 0 </reserved4>
  16.         <reserved3> 0 </reserved3>
  17.         <reserved2> 0 </reserved2>
  18.         <reserved1> 0 </reserved1>
  19.         <enabled> <true /> </enabled>
  20.         <rect>
  21.             <left>301</left>
  22.             <top>315</top>
  23.             <right>370</right>
  24.             <bottom>337</bottom>
  25.         </rect>
  26.         <style>roundrect</style>
  27.         <showName> <true /> </showName>
  28.         <highlight> <false /> </highlight>
  29.         <autoHighlight> <true /> </autoHighlight>
  30.         <sharedHighlight> <true /> </sharedHighlight>
  31.         <family>0</family>
  32.         <titleWidth>0</titleWidth>
  33.         <icon>0</icon>
  34.         <textAlign>center</textAlign>
  35.         <font>Chicago</font>
  36.         <textSize>12</textSize>
  37.         <textStyle>plain</textStyle>
  38.         <name>Example</name>
  39.         <script>on mouseUp
  40.  
  41. -- GET NAME OF ICON
  42.  
  43. ask "An ICON will be created using the card art found in the" &&┬¼
  44. "square marked:" & return &┬¼
  45. "                 ΓÇ£Draw your ICON hereΓÇ¥" & return & return &┬¼
  46. "Enter a name for your ICON." with sample
  47. if the result is not empty then exit mouseUp -- Cancel
  48. put it into iconName
  49. ----------------------------------------------------------------
  50.  
  51. -- COPY A 32 * 32 PIXEL REGION TO THE CLIPBOARD
  52.  
  53. choose select tool
  54. put right of btn "leftBorder" into xOrigin
  55. put bottom of btn "TopBorder" into yOrigin
  56. drag from xOrigin, yOrigin to (xOrigin + 31), (yOrigin + 31)
  57. doMenu "Copy Picture"
  58. choose browse tool
  59. ----------------------------------------------------------------
  60.  
  61. -- CONVERT THE IMAGE ON CLIPBOARD TO AN ICON
  62.  
  63. clipToICON iconName -- applies image on clipboard to an ICON
  64. ----------------------------------------------------------------
  65.  
  66. -- FORCE HYPERCARD TO READ THE MODIFIED RESOURCE FORK
  67.  
  68. lock screen
  69. set the lockMessages to true
  70. go home
  71. go back
  72. ----------------------------------------------------------------
  73.  
  74. -- DISPLAY NEW ICON
  75.  
  76. set the icon of btn 1 to iconName
  77. set the name of btn 1 to iconName
  78. show btn 1
  79.  
  80. end mouseUp</script>
  81.     </part>
  82.     <part>
  83.         <id>4</id>
  84.         <type>field</type>
  85.         <visible> <true /> </visible>
  86.         <dontWrap> <false /> </dontWrap>
  87.         <dontSearch> <false /> </dontSearch>
  88.         <sharedText> <false /> </sharedText>
  89.         <fixedLineHeight> <false /> </fixedLineHeight>
  90.         <autoTab> <false /> </autoTab>
  91.         <lockText> <false /> </lockText>
  92.         <rect>
  93.             <left>18</left>
  94.             <top>8</top>
  95.             <right>264</right>
  96.             <bottom>35</bottom>
  97.         </rect>
  98.         <style>rectangle</style>
  99.         <autoSelect> <false /> </autoSelect>
  100.         <showLines> <false /> </showLines>
  101.         <wideMargins> <true /> </wideMargins>
  102.         <multipleLines> <false /> </multipleLines>
  103.         <reservedFamily> 0 </reservedFamily>
  104.         <titleWidth>0</titleWidth>
  105.         <icon>0</icon>
  106.         <textAlign>left</textAlign>
  107.         <font>Palatino</font>
  108.         <textSize>18</textSize>
  109.         <textStyle>plain</textStyle>
  110.         <textHeight>24</textHeight>
  111.         <name>title</name>
  112.         <script></script>
  113.     </part>
  114.     <part>
  115.         <id>5</id>
  116.         <type>field</type>
  117.         <visible> <true /> </visible>
  118.         <dontWrap> <false /> </dontWrap>
  119.         <dontSearch> <false /> </dontSearch>
  120.         <sharedText> <false /> </sharedText>
  121.         <fixedLineHeight> <false /> </fixedLineHeight>
  122.         <autoTab> <false /> </autoTab>
  123.         <lockText> <false /> </lockText>
  124.         <rect>
  125.             <left>18</left>
  126.             <top>42</top>
  127.             <right>499</right>
  128.             <bottom>283</bottom>
  129.         </rect>
  130.         <style>scrolling</style>
  131.         <autoSelect> <false /> </autoSelect>
  132.         <showLines> <false /> </showLines>
  133.         <wideMargins> <false /> </wideMargins>
  134.         <multipleLines> <false /> </multipleLines>
  135.         <reservedFamily> 0 </reservedFamily>
  136.         <titleWidth>0</titleWidth>
  137.         <icon>0</icon>
  138.         <textAlign>left</textAlign>
  139.         <font>Palatino</font>
  140.         <textSize>12</textSize>
  141.         <textStyle>plain</textStyle>
  142.         <textHeight>16</textHeight>
  143.         <name>Documentation</name>
  144.         <script></script>
  145.     </part>
  146.     <part>
  147.         <id>7</id>
  148.         <type>button</type>
  149.         <visible> <true /> </visible>
  150.         <reserved5> 0 </reserved5>
  151.         <reserved4> 0 </reserved4>
  152.         <reserved3> 0 </reserved3>
  153.         <reserved2> 0 </reserved2>
  154.         <reserved1> 0 </reserved1>
  155.         <enabled> <true /> </enabled>
  156.         <rect>
  157.             <left>474</left>
  158.             <top>314</top>
  159.             <right>501</right>
  160.             <bottom>336</bottom>
  161.         </rect>
  162.         <style>roundrect</style>
  163.         <showName> <true /> </showName>
  164.         <highlight> <false /> </highlight>
  165.         <autoHighlight> <true /> </autoHighlight>
  166.         <sharedHighlight> <true /> </sharedHighlight>
  167.         <family>0</family>
  168.         <titleWidth>0</titleWidth>
  169.         <icon>0</icon>
  170.         <textAlign>center</textAlign>
  171.         <font>Chicago</font>
  172.         <textSize>12</textSize>
  173.         <textStyle>plain</textStyle>
  174.         <name>!</name>
  175.         <script>on mouseUp
  176. get fld "title"
  177. put word 1 of it into external
  178. put word 2 of it into resourceType
  179. if resourceType is "XCMD" then
  180. do (external && quote & "!" & quote & return & "get the result")
  181. else if resourceType is "XFCN" then
  182. do (get && external && "(" & quote & "!" & quote & ")")
  183. else
  184. exit mouseUp
  185. end if
  186. answer it
  187. end mouseUp</script>
  188.     </part>
  189.     <part>
  190.         <id>8</id>
  191.         <type>button</type>
  192.         <visible> <true /> </visible>
  193.         <reserved5> 0 </reserved5>
  194.         <reserved4> 0 </reserved4>
  195.         <reserved3> 0 </reserved3>
  196.         <reserved2> 0 </reserved2>
  197.         <reserved1> 0 </reserved1>
  198.         <enabled> <true /> </enabled>
  199.         <rect>
  200.             <left>473</left>
  201.             <top>290</top>
  202.             <right>500</right>
  203.             <bottom>312</bottom>
  204.         </rect>
  205.         <style>roundrect</style>
  206.         <showName> <true /> </showName>
  207.         <highlight> <false /> </highlight>
  208.         <autoHighlight> <true /> </autoHighlight>
  209.         <sharedHighlight> <true /> </sharedHighlight>
  210.         <family>0</family>
  211.         <titleWidth>0</titleWidth>
  212.         <icon>0</icon>
  213.         <textAlign>center</textAlign>
  214.         <font>Chicago</font>
  215.         <textSize>12</textSize>
  216.         <textStyle>plain</textStyle>
  217.         <name>?</name>
  218.         <script>on mouseUp
  219. get fld "title"
  220. put word 1 of it into external
  221. put word 2 of it into resourceType
  222. if resourceType is "XCMD" then
  223. do (external && "?" & return & "get the result")
  224. else if resourceType is "XFCN" then
  225. do (get && external && "(" & quote & "?" & quote & ")")
  226. else
  227. exit mouseUp
  228. end if
  229. answer it
  230. end mouseUp</script>
  231.     </part>
  232.     <part>
  233.         <id>12</id>
  234.         <type>button</type>
  235.         <visible> <true /> </visible>
  236.         <reserved5> 0 </reserved5>
  237.         <reserved4> 0 </reserved4>
  238.         <reserved3> 0 </reserved3>
  239.         <reserved2> 0 </reserved2>
  240.         <reserved1> 0 </reserved1>
  241.         <enabled> <true /> </enabled>
  242.         <rect>
  243.             <left>375</left>
  244.             <top>315</top>
  245.             <right>468</right>
  246.             <bottom>337</bottom>
  247.         </rect>
  248.         <style>roundrect</style>
  249.         <showName> <true /> </showName>
  250.         <highlight> <false /> </highlight>
  251.         <autoHighlight> <true /> </autoHighlight>
  252.         <sharedHighlight> <true /> </sharedHighlight>
  253.         <family>0</family>
  254.         <titleWidth>0</titleWidth>
  255.         <icon>0</icon>
  256.         <textAlign>center</textAlign>
  257.         <font>Chicago</font>
  258.         <textSize>12</textSize>
  259.         <textStyle>plain</textStyle>
  260.         <name>Show Source</name>
  261.         <script>on mouseUp
  262. toggleSource
  263. end mouseUp</script>
  264.     </part>
  265.     <part>
  266.         <id>13</id>
  267.         <type>button</type>
  268.         <visible> <true /> </visible>
  269.         <reserved5> 0 </reserved5>
  270.         <reserved4> 0 </reserved4>
  271.         <reserved3> 0 </reserved3>
  272.         <reserved2> 0 </reserved2>
  273.         <reserved1> 0 </reserved1>
  274.         <enabled> <true /> </enabled>
  275.         <rect>
  276.             <left>475</left>
  277.             <top>7</top>
  278.             <right>503</right>
  279.             <bottom>38</bottom>
  280.         </rect>
  281.         <style>transparent</style>
  282.         <showName> <false /> </showName>
  283.         <highlight> <false /> </highlight>
  284.         <autoHighlight> <true /> </autoHighlight>
  285.         <sharedHighlight> <true /> </sharedHighlight>
  286.         <family>0</family>
  287.         <titleWidth>0</titleWidth>
  288.         <icon>19678</icon>
  289.         <textAlign>center</textAlign>
  290.         <font>Chicago</font>
  291.         <textSize>12</textSize>
  292.         <textStyle>plain</textStyle>
  293.         <name>About</name>
  294.         <script>on mouseUp
  295. -- showDialog XCMD by Jay Hodgdon
  296. showDialog 1,6123,"","True"
  297. end mouseUp</script>
  298.     </part>
  299.     <part>
  300.         <id>14</id>
  301.         <type>field</type>
  302.         <visible> <false /> </visible>
  303.         <dontWrap> <false /> </dontWrap>
  304.         <dontSearch> <false /> </dontSearch>
  305.         <sharedText> <false /> </sharedText>
  306.         <fixedLineHeight> <false /> </fixedLineHeight>
  307.         <autoTab> <false /> </autoTab>
  308.         <lockText> <true /> </lockText>
  309.         <rect>
  310.             <left>18</left>
  311.             <top>42</top>
  312.             <right>499</right>
  313.             <bottom>283</bottom>
  314.         </rect>
  315.         <style>scrolling</style>
  316.         <autoSelect> <false /> </autoSelect>
  317.         <showLines> <false /> </showLines>
  318.         <wideMargins> <false /> </wideMargins>
  319.         <multipleLines> <false /> </multipleLines>
  320.         <reservedFamily> 0 </reservedFamily>
  321.         <titleWidth>0</titleWidth>
  322.         <icon>0</icon>
  323.         <textAlign>left</textAlign>
  324.         <font>Geneva</font>
  325.         <textSize>9</textSize>
  326.         <textStyle>plain</textStyle>
  327.         <textHeight>12</textHeight>
  328.         <name>Source Code</name>
  329.         <script>on mouseUp
  330. toggleSource
  331. end mouseUp
  332.  
  333. </script>
  334.     </part>
  335.     <part>
  336.         <id>15</id>
  337.         <type>button</type>
  338.         <visible> <true /> </visible>
  339.         <reserved5> 0 </reserved5>
  340.         <reserved4> 0 </reserved4>
  341.         <reserved3> 0 </reserved3>
  342.         <reserved2> 0 </reserved2>
  343.         <reserved1> 0 </reserved1>
  344.         <enabled> <true /> </enabled>
  345.         <rect>
  346.             <left>375</left>
  347.             <top>290</top>
  348.             <right>467</right>
  349.             <bottom>312</bottom>
  350.         </rect>
  351.         <style>roundrect</style>
  352.         <showName> <true /> </showName>
  353.         <highlight> <false /> </highlight>
  354.         <autoHighlight> <true /> </autoHighlight>
  355.         <sharedHighlight> <true /> </sharedHighlight>
  356.         <family>0</family>
  357.         <titleWidth>0</titleWidth>
  358.         <icon>0</icon>
  359.         <textAlign>center</textAlign>
  360.         <font>Chicago</font>
  361.         <textSize>12</textSize>
  362.         <textStyle>plain</textStyle>
  363.         <name>Print Doc</name>
  364.         <script>on mouseUp
  365. answer "Print Now?" with "Cancel" or "OK"
  366. if it is not "OK" then exit mouseUp
  367. if the name of me is "Print Doc" then
  368. print field "Documentation"
  369. else
  370. print field "Documentation"
  371. end if
  372. end mouseUp</script>
  373.     </part>
  374.     <part>
  375.         <id>17</id>
  376.         <type>button</type>
  377.         <visible> <true /> </visible>
  378.         <reserved5> 0 </reserved5>
  379.         <reserved4> 0 </reserved4>
  380.         <reserved3> 0 </reserved3>
  381.         <reserved2> 0 </reserved2>
  382.         <reserved1> 0 </reserved1>
  383.         <enabled> <true /> </enabled>
  384.         <rect>
  385.             <left>440</left>
  386.             <top>7</top>
  387.             <right>469</right>
  388.             <bottom>38</bottom>
  389.         </rect>
  390.         <style>transparent</style>
  391.         <showName> <false /> </showName>
  392.         <highlight> <false /> </highlight>
  393.         <autoHighlight> <true /> </autoHighlight>
  394.         <sharedHighlight> <true /> </sharedHighlight>
  395.         <family>0</family>
  396.         <titleWidth>0</titleWidth>
  397.         <icon>13744</icon>
  398.         <textAlign>center</textAlign>
  399.         <font>Chicago</font>
  400.         <textSize>12</textSize>
  401.         <textStyle>plain</textStyle>
  402.         <name>Home</name>
  403.         <script>on mouseUp
  404. go home
  405. end mouseUp</script>
  406.     </part>
  407.     <name></name>
  408.     <script>on openCard
  409. if the visible of fld "Source Code" is true then toggleSource
  410. end openCard
  411.  
  412. on toggleSource
  413. if the visible of fld "Source Code" is true then
  414. hide fld "Source Code"
  415. if there is a bg btn "Hide Source" then
  416. set the name of bg btn "Hide Source" to "Show Source"
  417. end if
  418. if there is a bg btn "Print Source" then
  419. set the name of bg btn "Print Source" to "Print Doc"
  420. end if
  421. else
  422. show fld "Source Code"
  423. if there is a bg btn "Show Source" then
  424. set the name of bg btn "Show Source" to "Hide Source"
  425. end if
  426. if there is a bg btn "Print Doc" then
  427. set the name of bg btn "Print Doc" to "Print Source"
  428. end if
  429. end if
  430. end toggleSource</script>
  431. </background>
  432.